package com.yanqu.road.server.cmd.activity.climbtower;

import com.yanqu.road.entity.activity.climbtower.ClimbTowerConfig;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ClimbTowerProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.ActivityMgr;
import com.yanqu.road.server.manger.activity.climbtower.ClimbTowerMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_CLIMB_TOWER_NOTICE, desc = "获取老虎机公告")
public class ClimbTowerDrawNoticeListCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {

        ClimbTowerConfig config = ClimbTowerMgr.getConfig();
        if (config == null || !ActivityMgr.activityInShowTime(config.getActivityInfo())) {
            return;
        }

        ClimbTowerProto.CrossClimbTowerNoticeReqMsg.Builder reqMsg = ClimbTowerProto.CrossClimbTowerNoticeReqMsg.newBuilder();
        reqMsg.setActivityId(config.getActivityInfo().getActivityId());

        player.sendPacket(Protocol.C_CLIMB_TOWER_GET_DRAW_NOTICE_LIST, reqMsg);

    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
